home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 099 (1989-05-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 099 (1989-05-15)(Ossowski, Stefan)(DE)(PD).adf / PCQ / Runtime / graphics.asm < prev    next >
Assembly Source File  |  1989-03-31  |  6KB  |  346 lines

  1.  
  2. *    Graphics.asm (of PCQ Pascal runtime library)
  3. *    Copyright (c) 1989 Patrick Quaid
  4.  
  5. *    These stubs implement the routines defined in Graphics.i.
  6. *    Note that we are referencing something called _GfxBase.
  7. *    This is the variable defined in Graphics.i that's supposed
  8. *    to hold the library.  This is why you have to open the graphics
  9. *    library and put a valid pointer in GfxBase before using these
  10. *    routines.
  11. *
  12. *    These routines try to save all registers except d0,d1,a0
  13. *    and a1.
  14.  
  15.     XREF    _GfxBase
  16.  
  17.     section    one
  18.  
  19.     XDEF    _AllocRaster
  20. _AllocRaster
  21.     move.l    8(sp),d0
  22.     move.l    4(sp),d1
  23.     move.l    _GfxBase,a6
  24.     jsr    _LVOAllocRaster(a6)
  25.     rts
  26.  
  27.     XDEF    _AreaDraw
  28. _AreaDraw
  29.     move.l    12(sp),a1
  30.     move.l    8(sp),d0
  31.     move.l    4(sp),d1
  32.     move.l    _GfxBase,a6
  33.     jsr    _LVOAreaDraw(a6)
  34.     rts
  35.  
  36.     XDEF    _AreaEnd
  37. _AreaEnd
  38.     move.l    4(sp),a1
  39.     move.l    _GfxBase,a6
  40.     jsr    _LVOAreaEnd(a6)
  41.     rts
  42.  
  43.     XDEF    _AreaMove
  44. _AreaMove
  45.     move.l    12(sp),a1
  46.     move.l    8(sp),d0
  47.     move.l    4(sp),d1
  48.     move.l    _GfxBase,a6
  49.     jsr    _LVOAreaMove(a6)
  50.     rts
  51.  
  52.     XDEF    _BltClear
  53. _BltClear
  54.     move.l    12(sp),a1
  55.     move.l    8(sp),d0
  56.     move.l    4(sp),d1
  57.     move.l    _GfxBase,a6
  58.     jsr    _LVOBltClear(a6)
  59.     rts
  60.  
  61.     XDEF    _Draw
  62. _Draw
  63.     move.l    12(sp),a1
  64.     move.l    8(sp),d0
  65.     move.l    4(sp),d1
  66.     move.l    _GfxBase,a6
  67.     jsr    _LVODraw(a6)
  68.     rts
  69.  
  70.     XDEF    _Flood
  71. _Flood
  72.     move.l    d2,-(sp)
  73.     move.l    16(sp),a1
  74.     move.l    12(sp),d2
  75.     move.l    8(sp),d0
  76.     move.l    4(sp),d1
  77.     move.l    _GfxBase,a6
  78.     jsr    _LVOFlood(a6)
  79.     move.l    (sp)+,d2
  80.     rts
  81.  
  82.     XDEF    _FreeRaster
  83. _FreeRaster
  84.     move.l    12(sp),a0
  85.     move.l    8(sp),d0
  86.     move.l    4(sp),d1
  87.     move.l    _GfxBase,a6
  88.     jsr    _LVOFreeRaster(a6)
  89.     rts
  90.  
  91.     XDEF    _InitBitMap
  92. _InitBitMap
  93.     move.l    d2,-(sp)
  94.     move.l    16(sp),a0
  95.     move.l    12(sp),d0
  96.     move.l    8(sp),d1
  97.     move.l    4(sp),d2
  98.     move.l    _GfxBase,a6
  99.     jsr    _LVOInitBitMap(a6)
  100.     move.l    (sp)+,d2
  101.     rts
  102.  
  103.     XDEF    _InitRastPort
  104. _InitRastPort
  105.     move.l    4(sp),a1
  106.     move.l    _GfxBase,a6
  107.     jsr    _LVOInitRastPort(a6)
  108.     rts
  109.  
  110.     XDEF    _Move
  111. _Move
  112.     move.l    12(sp),a1
  113.     move.l    8(sp),d0
  114.     move.l    4(sp),d1
  115.     move.l    _GfxBase,a6
  116.     jsr    _LVOMove(a6)
  117.     rts
  118.  
  119.     XDEF    _OwnBlitter
  120. _OwnBlitter
  121.     move.l    _GfxBase,a6
  122.     jsr    _LVOOwnBlitter(a6)
  123.     rts
  124.  
  125.     XDEF    _DisownBlitter
  126. _DisownBlitter
  127.     move.l    _GfxBase,a6
  128.     jsr    _LVODisownBlitter(a6)
  129.     rts
  130.  
  131.     XDEF    _PolyDraw
  132. _PolyDraw
  133.     move.l    12(sp),a0
  134.     move.l    8(sp),d0
  135.     move.l    4(sp),a1
  136.     move.l    _GfxBase,a6
  137.     jsr    _LVOPolyDraw(a6)
  138.     rts
  139.  
  140.     XDEF    _ReadPixel
  141. _ReadPixel
  142.     move.l    12(sp),a1
  143.     move.l    8(sp),d0
  144.     move.l    4(sp),d1
  145.     move.l    _GfxBase,a6
  146.     jsr    _LVOReadPixel(a6)
  147.     rts
  148.  
  149.     XDEF    _RectFill
  150. _RectFill
  151.     movem.l    d2-d3,-(sp)
  152.     move.l    28(sp),a1
  153.     move.l    24(sp),d0
  154.     move.l    20(sp),d1
  155.     move.l    16(sp),d2
  156.     move.l    12(sp),d3
  157.     move.l    _GfxBase,a6
  158.     jsr    _LVORectFill(a6)
  159.     movem.l    (sp)+,d2-d3
  160.     rts
  161.  
  162.     XDEF    _ScrollRaster
  163. _ScrollRaster
  164.     movem.l    d2-d5,-(sp)
  165.     move.l    44(sp),a1
  166.     move.l    40(sp),d0
  167.     move.l    36(sp),d1
  168.     move.l    32(sp),d2
  169.     move.l    28(sp),d3
  170.     move.l    24(sp),d4
  171.     move.l    20(sp),d5
  172.     move.l    _GfxBase,a6
  173.     jsr    _LVOScrollRaster(a6)
  174.     movem.l    (sp)+,d2-d5
  175.     rts
  176.  
  177.     XDEF    _SetAPen
  178. _SetAPen
  179.     move.l    8(sp),a1
  180.     move.l    4(sp),d0
  181.     move.l    _GfxBase,a6
  182.     jsr    _LVOSetAPen(a6)
  183.     rts
  184.  
  185.     XDEF    _SetBPen
  186. _SetBPen
  187.     move.l    8(sp),a1
  188.     move.l    4(sp),d0
  189.     move.l    _GfxBase,a6
  190.     jsr    _LVOSetBPen(a6)
  191.     rts
  192.  
  193.     XDEF    _SetDrMd
  194. _SetDrMd
  195.     move.l    8(sp),a1
  196.     move.l    4(sp),d0
  197.     move.l    _GfxBase,a6
  198.     jsr    _LVOSetDrMd(a6)
  199.     rts
  200.  
  201.     XDEF    _SetRast
  202. _SetRast
  203.     move.l    8(sp),a1
  204.     move.l    4(sp),d0
  205.     move.l    _GfxBase,a6
  206.     jsr    _LVOSetRast(a6)
  207.     rts
  208.  
  209.     XDEF    _SetRGB4
  210. _SetRGB4
  211.     movem.l    d2/d3,-(sp)
  212.     move.l    28(sp),a0
  213.     move.l    24(sp),d0
  214.     move.l    20(sp),d1
  215.     move.l    16(sp),d2
  216.     move.l    12(sp),d3
  217.     move.l    _GfxBase,a6
  218.     jsr    _LVOSetRGB4(a6)
  219.     movem.l    (sp)+,d2/d3
  220.     rts
  221.  
  222.     XDEF    _VBeamPos
  223. _VBeamPos
  224.     move.l    _GfxBase,a6
  225.     jsr    _LVOVBeamPos(a6)
  226.     rts
  227.  
  228.     XDEF    _WaitTOF
  229. _WaitTOF
  230.     move.l    _GfxBase,a6
  231.     jsr    _LVOWaitTOF(a6)
  232.     rts
  233.  
  234.     XDEF    _WritePixel
  235. _WritePixel
  236.     move.l    12(sp),a1
  237.     move.l    8(sp),d0
  238.     move.l    4(sp),d1
  239.     move.l    _GfxBase,a6
  240.     jsr    _LVOWritePixel(a6)
  241.     rts
  242.  
  243.  
  244. *    XREF    _LVOAttemptLockLayerRom
  245. *    XREF    _LVOGraphicsReserved2
  246. *    XREF    _LVOGraphicsReserved1
  247. *    XREF    _LVOBltBitMapRastPort
  248. *    XREF    _LVOFreeGBuffers
  249. *    XREF    _LVOUCopperListInit
  250. *    XREF    _LVOScrollVPort
  251. *    XREF    _LVOGetRGB4
  252. *    XREF    _LVOFreeColorMap
  253. *    XREF    _LVOGetColorMap
  254. *    XREF    _LVOFreeCprList
  255. *    XREF    _LVOXorRectRegion
  256. *    XREF    _LVOClipBlit
  257. *    XREF    _LVOFreeCopList
  258. *    XREF    _LVOFreeVPortCopLists
  259. *    XREF    _LVODisposeRegion
  260. *    XREF    _LVOClearRegion
  261. *    XREF    _LVONotRegion
  262. *    XREF    _LVONewRegion
  263. *    XREF    _LVOOrRectRegion
  264. *    XREF    _LVOAndRectRegion
  265.     XREF    _LVOFreeRaster
  266.     XREF    _LVOAllocRaster
  267. *    XREF    _LVORemFont
  268. *    XREF    _LVOAddFont
  269. *    XREF    _LVOAskFont
  270. *    XREF    _LVOInitTmpRas
  271.     XREF    _LVODisownBlitter
  272.     XREF    _LVOOwnBlitter
  273. *    XREF    _LVOCopySBitMap
  274. *    XREF    _LVOSyncSBitMap
  275. *    XREF    _LVOUnlockLayerRom
  276. *    XREF    _LVOLockLayerRom
  277. *    XREF    _LVOMoveSprite
  278. *    XREF    _LVOChangeSprite
  279. *    XREF    _LVOFreeSprite
  280. *    XREF    _LVOGetSprite
  281. *    XREF    _LVOWaitBOVP
  282.     XREF    _LVOScrollRaster
  283.     XREF    _LVOInitBitMap
  284.     XREF    _LVOVBeamPos
  285. *    XREF    _LVOCWait
  286. *    XREF    _LVOCMove
  287. *    XREF    _LVOCBump
  288. *    XREF    _LVOInitView
  289.     XREF    _LVOSetDrMd
  290.     XREF    _LVOSetBPen
  291.     XREF    _LVOSetAPen
  292.     XREF    _LVOPolyDraw
  293.     XREF    _LVOFlood
  294.     XREF    _LVOWritePixel
  295.     XREF    _LVOReadPixel
  296. *    XREF    _LVOBltPattern
  297.     XREF    _LVORectFill
  298.     XREF    _LVOBltClear
  299. *    XREF    _LVOQBSBlit
  300.     XREF    _LVOSetRGB4
  301. *    XREF    _LVOInitArea
  302. *    XREF    _LVOQBlit
  303.     XREF    _LVOWaitTOF
  304.     XREF    _LVOAreaEnd
  305.     XREF    _LVOAreaDraw
  306.     XREF    _LVOAreaMove
  307.     XREF    _LVODraw
  308.     XREF    _LVOMove
  309.     XREF    _LVOSetRast
  310. *    XREF    _LVOWaitBlit
  311. *    XREF    _LVOLoadView
  312. *    XREF    _LVOMakeVPort
  313. *    XREF    _LVOMrgCop
  314. *    XREF    _LVOInitVPort
  315.     XREF    _LVOInitRastPort
  316. *    XREF    _LVOLoadRGB4
  317. *    XREF    _LVOAreaEllipse
  318. *    XREF    _LVODrawEllipse
  319. *    XREF    _LVOInitGMasks
  320. *    XREF    _LVOGetGBuffers
  321. *    XREF    _LVOAnimate
  322. *    XREF    _LVOAddAnimOb
  323. *    XREF    _LVOSortGList
  324. *    XREF    _LVOSetCollision
  325. *    XREF    _LVORemVSprite
  326. *    XREF    _LVORemIBob
  327. *    XREF    _LVOInitMasks
  328. *    XREF    _LVOInitGels
  329. *    XREF    _LVODrawGList
  330. *    XREF    _LVODoCollision
  331. *    XREF    _LVOAddVSprite
  332. *    XREF    _LVOAddBob
  333. *    XREF    _LVOSetSoftStyle
  334. *    XREF    _LVOAskSoftStyle
  335. *    XREF    _LVOCloseFont
  336. *    XREF    _LVOOpenFont
  337. *    XREF    _LVOSetFont
  338. *    XREF    _LVOText
  339. *    XREF    _LVOTextLength
  340. *    XREF    _LVOClearScreen
  341. *    XREF    _LVOClearEOL
  342. *    XREF    _LVOBltTemplate
  343. *    XREF    _LVOBltBitMap
  344.  
  345.     END
  346.